<?php
namespace app\yxwadmin\controller;
use think\Controller;
use think\Session;

/**
* 后台公共控制器
*/
class Admin extends Controller{
    
    //构造方法
    public function _initialize(){
        $this->isLogin();
        $uid = Session('uid');
        $this->oss_main_path = 'http://images.siquanboke.cn';
    }

    public function isLogin(){
        $uid = Session('uid');
        $uname = Session('uname');
        if(empty($uid)||empty($uname)){
            $this->redirect('yxwadmin/login/index');
        }
    }
}